package com.easy.service.impl;

import com.easy.bean.Administrator;
import com.easy.dao.AdministratorDao;
import com.easy.service.IAdministratorService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdministratorService implements IAdministratorService {
    @Autowired
    AdministratorDao administratorDao;

    @Override
    public int addAdministrator(Administrator administrator) {
        return administratorDao.addAdministrator(administrator);
    }

    @Override
    public int editAdministrator(Administrator administrator) {
        return administratorDao.editAdministrator(administrator);
    }

    @Override
    public int deleteAdministrator(int id) {
        return administratorDao.deleteAdministrator(id);
    }

    @Override
    public List<Administrator> selectAdministrator(Page page, String text) {
        return administratorDao.selectAdministrator(page,text);
    }


    @Override
    public Administrator getAdministratorByAccount(String account) {
        return administratorDao.getAdministratorByAccount(account);
    }

    @Override
    public int AdministratorCount(String text) {
        return administratorDao.AdministratorCount(text);
    }
}
